package com.joysuch.wwyt.datadump.biz.convertor;

import cn.zlg.common.datadump.annotation.DataDumpField;
import cn.zlg.common.datadump.convertor.FieldValueConvert;
import org.springframework.stereotype.Component;

/**
 * @Author ZhaoQiuWei
 * @Date 2021/12/16 15:56
 */
@Component
public class ExportSignInMethodConvertor implements FieldValueConvert<Integer, String> {
    @Override
    public String convert(Object bean, Integer value, DataDumpField dataField) {
        if (value != null) {
            if (value == 2) {
                return "不签到";
            } else if (value == 0) {
                return "定位签到";
            } else if (value == 1) {
                return "NFC签到";
            } else if (value == 3) {
                return "二维码签到";
            }
        }
        return "";
    }
}
